package com.cadre.web.controller.officer;

import com.cadre.common.utils.R;
import com.cadre.system.domain.officer.A01;
import com.cadre.system.service.Batch_Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@Api(tags = {"上会管理-上报名单管理"})
@RequestMapping({"/profess/batch"})
@RestController
/* loaded from: Batch_Controller.class */
public class Batch_Controller {
    @Autowired
    private Batch_Service bSer;

    @GetMapping({"/getAllList"})
    @ApiOperation("获取所有批次")
    public R list() {
        return R.ok().put("list", (Object) this.bSer.getAllList());
    }

    @GetMapping({"/getListA01ByKey"})
    @ApiOperation("根据关键字查询人员")
    public R getListA01ByKey(@RequestParam String name) {
        String name2;
        List<A01> list = new ArrayList();
        if (!(name == null || name == "" || (name2 = name.replaceAll("，", ",").toUpperCase()) == null || name2.length() == 0)) {
            list = this.bSer.getListA01ByKey(name2.split(","));
        }
        return R.ok().put("list", (Object) list);
    }
}
